package atguigu04.override.exer1;

/**
 * ClassName: Kids
 * Package: atguigu03._extends.exer1
 * Description:
 *      修改继承内容的练习1中定义的类Kids，在Kids中重新定义employeed()方法，
 *
 *       覆盖父类ManKind中定义的employeed()方法，输出"Kids should study and no job."
 * @Author BuTang
 * @Create 2023/3/6 10:06
 * @Version 1.0
 */
public class Kids extends ManKind {
        private int yearsOld;

    public Kids(int yearsOld) {
        this.yearsOld = yearsOld;
    }
    public Kids() {
    }


    public Kids(int sex, int salary, int yearsOld) {
        super(sex, salary);
        this.yearsOld = yearsOld;
    }

    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public void employeed(){
        System.out.println("Kids should study and no job.");
    }

}
